#include <stdio.h>

void modify(int *p)
{
	*p = 1 + 2;
}

void f(int a)
{
	modify(a);
	printf("%d\n", a);
}

int main()
{
	f(1);

	return 0;
}

#if 0
/*
 * intel
 */
0000000000001149 <modify>:
    1149:	f3 0f 1e fa          	endbr64 
    114d:	55                   	push   %rbp
    114e:	48 89 e5             	mov    %rsp,%rbp
    1151:	48 89 7d f8          	mov    %rdi,-0x8(%rbp)
    1155:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
    1159:	c7 00 03 00 00 00    	movl   $0x3,(%rax)
    115f:	90                   	nop
    1160:	5d                   	pop    %rbp
    1161:	c3                   	retq   

0000000000001162 <f>:
    1162:	f3 0f 1e fa          	endbr64 
    1166:	55                   	push   %rbp
    1167:	48 89 e5             	mov    %rsp,%rbp
    116a:	48 83 ec 10          	sub    $0x10,%rsp
    116e:	89 7d fc             	mov    %edi,-0x4(%rbp)
    1171:	8b 45 fc             	mov    -0x4(%rbp),%eax
    1174:	48 98                	cltq   
    1176:	48 89 c7             	mov    %rax,%rdi
    1179:	e8 cb ff ff ff       	callq  1149 <modify>
    117e:	8b 45 fc             	mov    -0x4(%rbp),%eax
    1181:	89 c6                	mov    %eax,%esi
    1183:	48 8d 3d 7a 0e 00 00 	lea    0xe7a(%rip),%rdi        # 2004 <_IO_stdin_used+0x4>
    118a:	b8 00 00 00 00       	mov    $0x0,%eax
    118f:	e8 bc fe ff ff       	callq  1050 <printf@plt>
    1194:	90                   	nop
    1195:	c9                   	leaveq 
    1196:	c3                   	retq   

0000000000001197 <main>:
    1197:	f3 0f 1e fa          	endbr64 
    119b:	55                   	push   %rbp
    119c:	48 89 e5             	mov    %rsp,%rbp
    119f:	bf 01 00 00 00       	mov    $0x1,%edi
    11a4:	e8 b9 ff ff ff       	callq  1162 <f>
    11a9:	b8 00 00 00 00       	mov    $0x0,%eax
    11ae:	5d                   	pop    %rbp
    11af:	c3                   	retq   

/*
 * arm
 */
000000000040055c <modify>:
  40055c:	d10043ff 	sub	sp, sp, #0x10
  400560:	f90007e0 	str	x0, [sp, #8]
  400564:	f94007e0 	ldr	x0, [sp, #8]
  400568:	52800061 	mov	w1, #0x3                   	// #3
  40056c:	b9000001 	str	w1, [x0]
  400570:	d503201f 	nop
  400574:	910043ff 	add	sp, sp, #0x10
  400578:	d65f03c0 	ret

000000000040057c <f>:
  40057c:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  400580:	910003fd 	mov	x29, sp
  400584:	b9001fa0 	str	w0, [x29, #28]
  400588:	b9801fa0 	ldrsw	x0, [x29, #28]
  40058c:	97fffff4 	bl	40055c <modify>
  400590:	90000000 	adrp	x0, 400000 <_init-0x3e8>
  400594:	9119e000 	add	x0, x0, #0x678
  400598:	b9401fa1 	ldr	w1, [x29, #28]
  40059c:	97ffffad 	bl	400450 <printf@plt>
  4005a0:	d503201f 	nop
  4005a4:	a8c27bfd 	ldp	x29, x30, [sp], #32
  4005a8:	d65f03c0 	ret

00000000004005ac <main>:
  4005ac:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
  4005b0:	910003fd 	mov	x29, sp
  4005b4:	52800020 	mov	w0, #0x1                   	// #1
  4005b8:	97fffff1 	bl	40057c <f>
  4005bc:	52800000 	mov	w0, #0x0                   	// #0
  4005c0:	a8c17bfd 	ldp	x29, x30, [sp], #16
  4005c4:	d65f03c0 	ret


#endif

